﻿using FirstFloor.ModernUI.Windows.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BYS.XiAnComDept.App
{
    /// <summary>
    /// Interaction logic for ConfirmationDialog.xaml
    /// </summary>
    public partial class PromptDialog : ModernDialog
    {
        private PromptDialog()
        {
            InitializeComponent();

            // define the dialog buttons
            this.Buttons = new Button[] { this.OkButton, this.CancelButton };
            this.OkButton.Content = "确定";
            this.CancelButton.Content = "取消";
            this.TextBoxContent.Focus();
        }

        public PromptDialog(string title, string defaultInput):this()
        {
            this.Title = this.TextTitle.Text = title;
            
            this.Input = defaultInput;
        }

        public string Input 
        { 
            get 
            { 
                return this.TextBoxContent.Text; 
            }
            set
            {
                this.TextBoxContent.Text = value;
            }
        }
    }
}
